package com.wmh.baseservice.admin.pojo.vo.user;

import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 谢骏
 * @date 2023/8/14 16:57
 **/
@Data
@Accessors(chain = true)
public class CreateAdminReqVO {

    @NotBlank(message = "未提交用户名称")
    @Length(min = 2, max =20,message = "用户名称长度在 2 ~ 20 个字符之间")
    private String name;

    @NotBlank(message = "未提交用户账号")
    @Length(min = 4,max = 20,message = "用户账号在 4 ~ 20 个字符之间")
    private String account;

    @NotBlank(message = "未提交账号密码")
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$",message = "密码必须由数字、字母两种字符组成，长度在6-20位之间")
    private String password;

    @NotBlank(message = "未提交确认密码")
    private String rePassword;

    @NotBlank(message = "未提交管理员邮箱")
    @Email(message = "非邮箱格式内容")
    private String email;

    private String remark;
}
